###
 # @Author: Broin
 # @Date: 2022-01-12 10:49:35
 # @LastEditTime: 2022-01-12 10:51:03
 # @LastEditors: your name
 # @Description: 
 # @FilePath: /myCore/os/build.sh
 # MADE BY BROIN
### 


#!/bin/bash
cargo build --release
rust-objcopy --strip-all target/riscv64gc-unknown-none-elf/release/os -O binary target/riscv64gc-unknown-none-elf/release/os.bin

qemu-system-riscv64 \
-machine virt \
-nographic \
-bios ../bootloader/rustsbi-qemu.bin \
-device loader,file=target/riscv64gc-unknown-none-elf/release/os.bin,addr=0x80200000